<template>
  <div>
    <ul>
      <li v-for="(item, index) in newslists" :key="index">
        <a :href="item.path">
          <span>{{ item.title }}</span>
          {{ item.text }}
        </a>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: "newslist",
  props: {
    newslists: [],
  },
};
</script>
<style scoped>
ul {
  display: flex;
  flex-direction: column;
  align-items: center;
}
li,
a {
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #999;
}
li {
  margin-bottom: 5px;
}
a span {
  color: #e1251b;
  background: rgba(225, 37, 27, 0.08);
  margin-right: 6px;
  padding: 4px;
}
a:hover {
  color: #e1251b;
}
</style>